using SurveySez.Model;

namespace SurveySez.NavigationModel
{
	public class PendingCorrectOutcome : PendingOutcome
	{
		private RoundNavigation _roundNavigation;
		private Response _guessedAnswer;

		public PendingCorrectOutcome(RoundNavigation roundNavigation, Response guessedAnswer)
		{
			_roundNavigation = roundNavigation;
			_guessedAnswer = guessedAnswer;
		}

		public override bool IsAnswerPending(Response answer)
		{
			return answer == _guessedAnswer;
		}

		public override bool IsIncorrectPending()
		{
			return false;
		}

		public override void Commit()
		{
			_roundNavigation.AddGuessedAnswer(_guessedAnswer);
		}
	}
}
